package com.example.mybaiduweishi.db;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.example.mybaiduweishi.vo.BaiBaoXiang;
import com.example.mybaiduweishi.vo.MobileInfo;

import com.example.mybaiduweishi.db.BaiBaoXiangDao;
import com.example.mybaiduweishi.db.MobileInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig baiBaoXiangDaoConfig;
    private final DaoConfig mobileInfoDaoConfig;

    private final BaiBaoXiangDao baiBaoXiangDao;
    private final MobileInfoDao mobileInfoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        baiBaoXiangDaoConfig = daoConfigMap.get(BaiBaoXiangDao.class).clone();
        baiBaoXiangDaoConfig.initIdentityScope(type);

        mobileInfoDaoConfig = daoConfigMap.get(MobileInfoDao.class).clone();
        mobileInfoDaoConfig.initIdentityScope(type);

        baiBaoXiangDao = new BaiBaoXiangDao(baiBaoXiangDaoConfig, this);
        mobileInfoDao = new MobileInfoDao(mobileInfoDaoConfig, this);

        registerDao(BaiBaoXiang.class, baiBaoXiangDao);
        registerDao(MobileInfo.class, mobileInfoDao);
    }
    
    public void clear() {
        baiBaoXiangDaoConfig.clearIdentityScope();
        mobileInfoDaoConfig.clearIdentityScope();
    }

    public BaiBaoXiangDao getBaiBaoXiangDao() {
        return baiBaoXiangDao;
    }

    public MobileInfoDao getMobileInfoDao() {
        return mobileInfoDao;
    }

}
